#include <linux/cpu.h>
#include <linux/smp.h>

struct cpuhp_step
{
    const char *name;
    union
    {
        int (*single)(unsigned int cpu);
        int (*multi)(unsigned int cpu, struct hlist_node *node);
    } startup;
};

/* Boot processor state steps */
static struct cpuhp_step cpuhp_hp_states[] = {};

/* Requires cpu_add_remove_lock to be held */
static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
{
    int ret = 0;

    // ret = cpuhp_up_callbacks(cpu, st, target);

    return ret;
}

static int cpu_up(unsigned int cpu, enum cpuhp_state target)
{
    int err = 0;

    err = _cpu_up(cpu, 0, target);

    return err;
}

static void __init cpuhp_bringup_mask(const struct cpumask *mask, unsigned int ncpus,
                                      enum cpuhp_state target)
{
    unsigned int cpu;

    for_each_cpu(cpu, mask)
    {
        cpu_up(cpu, target);
    }
}

void cpuhp_online_idle(enum cpuhp_state state)
{
}

__init void bringup_nonboot_cpus(unsigned int max_cpus)
{
    if (!max_cpus)
        return;

    /* Full per CPU serialized bringup */
    cpuhp_bringup_mask(cpu_present_mask(), max_cpus, CPUHP_ONLINE);
}
